import $api from "@/http/api.js";
export default {
    namespaced: true,
    state: {
        rows: [],
        // total: 0,
        // pages: 0,
    },
    mutations: {
        SET_DATA(state, payload) {
            state.rows = payload.data;
        },
    },
    actions: {
        // 获取所有会员
        async getDataAsync(context, pageData) {
            const { data } = await $api.member.getVip(pageData);
            if (data.meta.status == 200) {
                context.commit("SET_DATA", data);
            }
        },
        // 删除一个会员
        async deleteOnceData(context, _id) {
            const { data } = await $api.member.delVip(_id);
            return data;
        },
    },
};